package adapter.demo;
public class Adapter implements VGA, USB {
	USB	target;
	VGA	adaptee;
	public void connectUSB(USB target) {
		this.target = target;
	}
	public void connectVGA(VGA adaptee) {
		this.adaptee = adaptee;
	}
	public void work() {

		System.out.println("接受到usb信号");
		connectUSB(target);

		System.out.println("我知道将usb转化为vga信号");

		adaptee.work();
		System.out.println("输出vga信号");
	}
}
